package com.ethan.controller;

import com.ethan.util.R;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: TODO
 * @Author ethan
 * @CreateDate:2022/3/21 15:22
 * @UpdateDate: 2021/6/17 08:52
 * @Version 1.0
 */
@RestController
@RequestMapping("test")
public class TestController {

    @GetMapping("r1")
    @PreAuthorize("hasAuthority('sys_user_add')")
    public R<String>test(){
        return R.buildSuccess("hello i am test");
    }
}
